package com.ln.lnzw.adapter;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Environment;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ln.lnzw.R;
import com.ln.lnzw.bean.ItemBean;

import java.io.File;
import java.util.List;

/**
 * Created by wuwei on 2018/3/29.
 */

public class HandleAffairsGridAdapter extends BaseQuickAdapter<ItemBean,BaseViewHolder> {
    private ImageView imageView;

    public HandleAffairsGridAdapter(int layoutResId, @Nullable List<ItemBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ItemBean item) {
        switch (item.getName()){
            case "办事服务":
                helper.setText(R.id.name,"办事服务");
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.icon_banshi_banshifuwu);
                break;
            case "投资项目":
                helper.setText(R.id.name,"投资项目");
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.icon_banshi_touzixiangmu);
                break;
            case "审批公示":
                helper.setText(R.id.name,"审批公示");
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.icon_banshi_shenpigongshi);
                break;
            case "互动交流":
                helper.setText(R.id.name,"互动交流");
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.icon_banshi_hudongjiaoliu);
                break;
            case "办件查询":
                helper.setText(R.id.name,"办件查询");
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.icon_banshi_banjianchaxun);
                break;
            case "帮助手册":
                helper.setText(R.id.name,"帮助手册");
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.icon_banshi_bangzhushouce);
                break;
            case "资讯回复":
                helper.setText(R.id.name,"咨询回复");
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.icon_banshi_zixunhuifu);
                break;
            case "热线电话":
                helper.setText(R.id.name,"热线电话");
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.icon_banshi_rexiandianhua);
                break;
        }
    }

}
